var https = require('https')
    ,fs = require("fs");

var options = {
    key: fs.readFileSync('./privatekey.pem'),
    cert: fs.readFileSync('./certificate.pem')
};

var express = require('express');
var app = express();
app.use(function(req,res){
	console.log('req '+req.url);
	res.status(200).send('gogo haha');
});

// app.listen(3000, function () {
//     console.log('server listen at 3000...');
// });

https.createServer(options,app).listen(3011, function () {
    console.log('Https server listening on port ' + 3011);
});